A New Algorithm for Generating Necklaces

نویسندگان

  • Terry MinYih Wang
  • Carla D Savage
چکیده

In this paper we present an algorithm for generating the lexicographi cally smallest representatives of all the n bead necklaces in k colors The time required is O nN k where N n k is the number of necklaces with n beads of k colors To our knowledge this is the rst algorithm for this problem which has been proved to asymptotically improve the obvious O n k approach of examining all k ary n tuples and rejecting those which are not lexicographically smallest rotations Our algorithm has another advantage over a competitive one proposed by Fredericksen Kessler and Maiorana in that it can be implemented so that there is a gap of at most one non necklace examined between any two necklaces generated whereas the FKM algorithm can have gaps as large as b n c Although no good upper bound was established for FKM we show experimentally that its perfor mance appears to be as least as good as ours for k

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Fast Algorithms to Generate Necklaces, Unlabeled Necklaces, and Irreducible Polynomials over GF(2)

Many applications call for exhaustive lists of strings subject to various constraints, such as inequivalence under group actions. A k-ary necklace is an Ž . equivalence class of k-ary strings under rotation the cyclic group . A k-ary unlabeled necklace is an equivalence class of k-ary strings under rotation and permutation of alphabet symbols. We present new, fast, simple, recursive algoŽ . rit...

متن کامل

Generating Necklaces

A k color n bead necklace is an equivalence class of k ary n tuples under rotation In this paper we analyze an algorithm due to Fredricksen Kessler and Maiorana FKM to show that necklaces can be generated in constant amortized time We also present a new approach to generating necklaces which we conjecture can also be implemented in constant amortized time The FKM algorithm generates a list of n...

متن کامل

A New Algorithm for Generating

In this paper we present an algorithm for generating the lexicographi-cally smallest representatives of all the n-bead necklaces in k-colors. The time required is O(nN n k), where N n k is the number of necklaces with n beads of k colors. To our knowledge, this is the rst algorithm for this problem which has been proved to asymptotically improve the obvious O(n k n) approach of examining all k-...

متن کامل

Gray codes for necklaces and Lyndon words of arbitrary base

Recently, a Gray code for unrestricted binary necklaces and their relatives was discovered by Vajnovszki [Discrete Mathematics & Theoretical Computer Science, to appear]. The Gray code is constructed by modifying the classical FKM algorithm for generating necklaces in lexicographic order. We present a generalisation of Vajnovszki’s algorithm, giving a Gray code for necklaces and their relatives...

متن کامل

A Gray Code for Necklaces of Fixed Density

A necklace is an equivalence class of binary strings under rotation In this paper we present a Gray code listing of all n bit necklaces with d ones so that i each necklace is listed exactly once by a representative from its equivalence class and ii successive representatives including the last and the rst in the list di er only by the transposition of two bits The total time required is O nN n ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2015